<script type="text/javascript">
    $(function() {
        var modelid = "{{ model_id }}";
        var modeltype = "PlotContext";
        var elementid = "{{ div_id }}";
        console.log("  modeltype:", modeltype);
        console.log("  modelid:", modelid);
        console.log("  elementid:", elementid);
        var all_models = {{{ all_models }}};
        Bokeh.load_models(all_models);
        var model = Bokeh.Collections(modeltype).get(modelid);
        var view = new model.default_view({model: model, el: "#{{ div_id }}"});
    });
</script>